import { createRouter, createWebHistory } from 'vue-router'
import Pokedex from '../views/pokedex/index.vue'
import PokemonDetail from '../views/pokedex/detail.vue'
import Team from '../views/team/index.vue'
import TeamPokemon from '../views/team/pokemon.vue'

const routes = [
  {
    path: '/',
    redirect: '/pokedex'
  },
  {
    path: '/pokedex',
    name: 'Pokedex',
    component: Pokedex
  },
  {
    path: '/pokemon/:id',
    name: 'PokemonDetail',
    component: PokemonDetail
  },
  {
    path: '/team',
    name: 'Team',
    component: Team
  },
  {
    path: '/team/pokemon/:id',
    name: 'TeamPokemon',
    component: TeamPokemon
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 